package cn.edu.lcu.cs.javateaching.io;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Test {

	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

		int errorNum = 1;

		for (;; errorNum++) {

			if (!"123456".equals(bufferedReader.readLine())) {

				if (errorNum == 5) {
					System.out.println("密码错误，结束游戏");
					System.exit(0);
				}

			} else {
				break;
			}
		}

		System.out.println("恭喜你进入游戏");

	}

}
